<script type="text/javascript" language="JavaScript" charset="utf-8" src="{$_s.js_dir}func.js"></script>

<form action="{$_s.app_dir}manager/index/" name="sForm" id="sForm" method="get" target="iBody">
	<input type="hidden" name="formAction" id="formAction" value="" />
	<ul id="quickLink">
		<li class="home">
			<em><a href="#" class="dw" title="展开全部菜单项"></a></em>
			<a href="./m.php?frm=index" target="iBody">后台欢迎页</a></li>
		{$menus}
		<div class="clear"></div>
	</ul>
</form>

<script type="text/javascript" language="JavaScript" charset="utf-8">
<!--
	{literal}
	var menu_expand = {};
	var str = $.trim(get_cookie('menu_expand'));
	if(str != ''){
		var arr = str.split(',');
		for(var x in arr){
			if(arr[x] > 0){
				menu_expand[arr[x]] = true;
			}
		}
	}

	var bethesameheight = function(){
		var h = $(window).height() - 16;
		if($('#quickLink').height() < h){
			$('#quickLink').height(h);
		}
	}
	jQuery(function($){
		// 页面加载完成后，调整主体区域的高度
		$(window).resize(bethesameheight);
		bethesameheight();

		// 箭头初始状态
		menu_expand_state();

		$('#quickLink li.home em a').click(function(){
			var cls = $(this).attr('class');
			if(cls == 'up'){
				$(this).attr('class', 'dw').attr('title', '展开全部菜单项');
				var lis = $('#quickLink').children('li.sub');
				lis.each(function(i, n){
					$(n).attr('class', 'add').children('ul').hide();
					var aobj = $(n).children('a').get(0);
					var name = $(aobj).attr('name');
					menu_expand[name] = false;
				});
				bethesameheight();
			}else{
				$(this).attr('class', 'up').attr('title', '收缩全部菜单项');
				var lis = $('#quickLink').children('li.add');
				lis.each(function(i, n){
					$(n).attr('class', 'sub').children('ul').show();
					var aobj = $(n).children('a').get(0);
					var name = $(aobj).attr('name');
					menu_expand[name] = true;
				});
			}
			$(this).trigger('blur');
		});
				
		// 子菜单
		$('#quickLink a[href=#]').click(function(event){
			event.stopPropagation();
			var id = $(this).attr('name');
			if($(this).parent('li').attr('class') == 'add'){
				$(this).parent('li').attr('class', 'sub');
				menu_expand[id] = true;
			}else{
				$(this).parent('li').attr('class', 'add');
				menu_expand[id] = false;
			}
			$(this).siblings('ul').toggle();
			menu_expand_save();
			menu_expand_state();
		});
		
		// 左边菜单项点击	
		$('#quickLink li.home > a, #quickLink li.item > a').click(function(event){
			event.stopPropagation();
			$('#quickLink li > a').removeClass();
			$(this).addClass('selected');
			
			var target = $(this).attr('target');
			if(target == 'eBody'){
				show_ebody();
			}else{
				show_ibody();
			}
		});
	});


	function menu_expand_state(){
		var lis = $('#quickLink').children('li.sub');
		if(lis.length > 0){
			$('#quickLink li.home em a').attr('class', 'up').attr('title', '收缩全部菜单项');
		}else{
			$('#quickLink li.home em a').attr('class', 'dw').attr('title', '展开全部菜单项');
		}
	}
	
	function menu_expand_save(){
		var arr = [];
		for(var x in menu_expand){
			if(menu_expand[x] == true){
				arr.push(x);
			}
		}
		var str = arr.join(',');
		return set_cookie('menu_expand', str, 3153600000);
	}
	{/literal}
-->
</script>